package me.muci.abstractFactoryPattern.factory;

import org.apache.commons.lang3.StringUtils;

/**
 * ClassName: FactoryProducer <br/>
 * Description: <br/>
 * date: 2021/8/4 16:00<br/>
 *
 * @author muci<br />
 * @description
 * @since JDK 1.8
 */
public class FactoryProducer {
    public static AbstractFactory getFactory(String choice){
        if (StringUtils.equals(choice,"SHAPE")){
            return new ShapeFactory();
        }else if(StringUtils.equals(choice,"COLOR")){
            return new ColorFactory();
        }
        return null;
    }
}
